package com.link2room.ironhide.controller.task;

import com.link2room.common.dto.result.base.BaseResultDto;
import com.link2room.ironhide.dto.param.inside.HotelMinPriceInsideParamDto;
import com.link2room.ironhide.facade.IHotelInfoFacadeService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * Created by sss on 2016/9/13.
 */
@RestController
@RequestMapping("/Task/HotelMinPrices")
public class HotelMinPriceTaskController {
    @Resource
    private IHotelInfoFacadeService hotelInfoFacadeService;

    @RequestMapping("/Update")
    public BaseResultDto pricePools(
            @RequestParam(value = "lhotelCode" ,required = false) String lhotelCode,
            @RequestParam(value = "pbChannel" ,required = false) String pbChannel
    ) throws Exception {
        HotelMinPriceInsideParamDto hotelMinPriceInsideParamDto =new HotelMinPriceInsideParamDto();
        hotelMinPriceInsideParamDto.setLhotelCode(lhotelCode);
        hotelMinPriceInsideParamDto.setPbChannel(pbChannel);
        hotelInfoFacadeService.saveHotelGroupMinPrice(hotelMinPriceInsideParamDto);
        BaseResultDto l2rRs=new BaseResultDto();
        l2rRs.setResultCode(0);
        return l2rRs;
    }
}
